<?php
header("content-type:text/html; charset=utf-8");
$id = $_GET['id'];
$depart  = $_POST['depart'];  
require("config.php");												//包含数据库连接文件
$sql = "UPDATE depart SET d_name='$depart'";
$result=mysql_query($sql);
if($result)
{
	echo '<script>alert("修改成功");location.href="depart.php"</script>';
}else
{
	echo '<script>alert("修改失败");location.href="depart.php"</script>';
} 



?>